<template>
  <div class="app-container">
    <el-row :gutter="24">
      <!-- 字典 -->
      <el-col :span="12">
        <Dict @getDictId="handlerGetDictId" />
      </el-col>

      <!-- 字典子项 -->
      <el-col :span="12">
        <DictItem :dict-id="dictId" />
      </el-col>
    </el-row>
  </div>
</template>

<script>
import Dict from './dict'
import DictItem from './dict-item'

export default {
  components: {
    Dict,
    DictItem
  },
  data() {
    return {
      dictId: undefined
    }
  },

  methods: {
    // 字典选择回调
    handlerGetDictId(data) {
      this.dictId = data
    }
  }
}
</script>
